const weakMapObj = new WeakMap()

function Compare() {
	return (target: any, key: any, descriptor: any) => {
		weakMapObj.set(descriptor.value, key)
	}
}

class DescriptorClass {
	@Compare()
	findAll() {}
}

class DescriptorClassCopy {
	findAll() {}
}

const desc = new DescriptorClass()
const proto = Object.getPrototypeOf(desc)

const fn = proto['findAll']

console.log(fn)
console.log(weakMapObj.get(fn))

const desc2 = new DescriptorClassCopy()
const proto2 = Object.getPrototypeOf(desc2)
const fn2 = proto2['findAll']
console.log(fn2)
console.log(weakMapObj.get(fn2))
